package com.itheima.service.impl;

import com.itheima.dao.AccountDao;
import com.itheima.pojo.Account;
import com.itheima.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-14 09:45
 * @description
 */
@Service
@Transactional
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountDao accountDao;
    @Override
    @Transactional
    public void add(Account account) {
        System.out.println("service代码正在运行........");

        accountDao.save(account);
        //int i=5/0;
    }
}
